package com.zjp.blog.data.model;

import java.io.Serializable;

public class Config extends BaseModel implements Serializable {
    /** configs.key_ */
    private String key;

    /** configs.value */
    private String value;

    private static final long serialVersionUID = 1L;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key == null ? null : key.trim();
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value == null ? null : value.trim();
    }

    @Override
    public boolean equals(Object o){
        if(o instanceof Config){
            Config that = (Config)o;
            return this.getKey().equals(that.getKey()) && this.getValue().equals(that.getValue());
        }

        return false;
    }

    @Override
    public int hashCode() {
        int result = key.hashCode();
        result = 31 * result + value.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "Config{" +
                "key='" + key + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}